// 权限验证
const checkPermission = (role) => {
	return (req, res, next) => {
		if (role.includes(req.user.roles)) {
			next();
		} else {
			res.error("权限不足，请联系管理员或开发人员！");
		}
	};
};

module.exports = checkPermission;